﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Master/Admin.Master" AutoEventWireup="true" CodeBehind="ContactList.aspx.cs" Inherits="Besture.UI.ContactList" %>

<%@ Register TagPrefix="dxwgv" Namespace="DevExpress.Web.ASPxGridView" Assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.2" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <div class="mainbox">
        <table>
            <tr>
                <td>
                    <dx:ASPxButton ID="btnSelectAll" runat="server" UseSubmitBehavior="False" AutoPostBack="False" Text="选中全部">
                        <ClientSideEvents Click="function(s, e) { grid.SelectRows(); }" />
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:ASPxButton ID="btnUnSelectAll" runat="server" UseSubmitBehavior="False" AutoPostBack="False" Text="取消全部">
                        <ClientSideEvents Click="function(s, e) { grid.UnselectRows(); }" />
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:ASPxButton ID="btnDel" runat="server" UseSubmitBehavior="False" Text="删除选中" OnClick="btnDel_Click">
                        <ClientSideEvents Click="function(s, e) { e.processOnServer= confirm('删除后无法恢复，确定删除选中项吗??'); }" />
                    </dx:ASPxButton>
                </td>
                <td>
                    <dx:ASPxButton ID="btnAdd" runat="server" UseSubmitBehavior="False" Text="添加" OnClick="btnAdd_Click" />
                </td>
            </tr>
        </table>
        <dxwgv:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" Width="99%" AutoGenerateColumns="False" KeyFieldName="ID" OnCustomCallback="grid_CustomCallback"
            OnRowDeleting="grid_RowDeleting">
            <Columns>
                <dxwgv:GridViewCommandColumn ShowSelectCheckbox="true" VisibleIndex="0" Width="5%" FixedStyle="Left">
                    <HeaderTemplate>
                        <input type="checkbox" onclick="grid.SelectAllRowsOnPage(this.checked);" title="全选/全不选" id="chkAll" runat="server" />
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </dxwgv:GridViewCommandColumn>
                <dxwgv:GridViewCommandColumn VisibleIndex="1" Caption="删除" Width="5%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" ButtonType="Image"
                    FixedStyle="Left">
                    <DeleteButton Visible="true" Image-Url="/admin/images/del.gif" Text="删除">
                    </DeleteButton>
                </dxwgv:GridViewCommandColumn>
                <dxwgv:GridViewDataTextColumn Caption="编辑" VisibleIndex="2" Width="5%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" FixedStyle="Left">
                    <DataItemTemplate>
                        <a href="ContactSet.aspx?id=<%# Eval("ID") %>">
                            <img src="/admin/images/edit.gif" alt="查看编辑" title="查看编辑" /></a>
                    </DataItemTemplate>
                </dxwgv:GridViewDataTextColumn>
               <dxwgv:GridViewDataTextColumn VisibleIndex="2" Caption="公司名称" FieldName="CompanyName" Width="" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
				<dxwgv:GridViewDataTextColumn VisibleIndex="3" Caption="外线（总机）" FieldName="PhoneNum" Width="" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
				<dxwgv:GridViewDataTextColumn VisibleIndex="4" Caption="传 真" FieldName="Fax" Width="" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
				<dxwgv:GridViewDataTextColumn VisibleIndex="5" Caption="公司地址" FieldName="CompanyAddress" Width="" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
				<dxwgv:GridViewDataTextColumn VisibleIndex="6" Caption="邮 编" FieldName="ZipCode" Width="" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
				<dxwgv:GridViewDataTextColumn VisibleIndex="7" Caption="排 序" FieldName="Sort" Width="" CellStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"/>
				
            </Columns>
        </dxwgv:ASPxGridView>
    </div>
</asp:Content>

